﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admincp/Admin.Master" AutoEventWireup="true"
    CodeBehind="Price.aspx.cs" Inherits="TPCN.Admincp.Price" %>

<asp:Content ID="head" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="name" ContentPlaceHolderID="nameholder" runat="server">Đơn giá</asp:Content>
<asp:Content ID="content" ContentPlaceHolderID="maincontent" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <Scripts>
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
        </Scripts>
    </telerik:RadScriptManager>
    <asp:Panel ID="ButtonPanel" runat="server" CssClass="right">
        <asp:Button ID="btnInsert" runat="server" Text="Thêm giá" CssClass="button button-green"
            OnClick="btnInsert_Click" />
        <asp:Button ID="btnDelete" runat="server" Text="Xóa" CssClass="button button-green"
            OnClick="btnDelete_Click" />
    </asp:Panel>
    <asp:Panel ID="ErrorPanel" runat="server">
        <asp:ValidationSummary ID="summary" runat="server" CssClass="message error" />
    </asp:Panel>
    <hr />
    <asp:Panel ID="GridViewPanel" runat="server">
        <asp:GridView ID="SupportOnlineGridView" runat="server" AutoGenerateColumns="False"
            Width="100%" DataKeyNames="SupportOnlineID" Height="16px" OnRowCommand="SupportOnlineGridView_RowCommand"
            AllowPaging="True" GridLines="None" CssClass="mGrid" AlternatingRowStyle-CssClass="alt"
            PagerStyle-CssClass="pgr" OnPageIndexChanging="SupportOnlineGridView_PageIndexChanging"
            PageSize="3">
            <AlternatingRowStyle CssClass="alt" />
            <Columns>
                <asp:TemplateField>
                    <ItemTemplate>
                        <asp:CheckBox ID="chkSelect" runat="server" CssClass="chkItem" />
                    </ItemTemplate>
                    <HeaderTemplate>
                        <asp:CheckBox ID="chkSelectAll" runat="server" CssClass="chkHeader" />
                    </HeaderTemplate>
                    <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="30px" />
                    <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="30px" />
                </asp:TemplateField>
                <asp:BoundField DataField="SupportOnlineID" ReadOnly="True">
                    <HeaderStyle CssClass="hide" />
                    <ItemStyle CssClass="hide" />
                </asp:BoundField>
                <asp:BoundField DataField="Name" HeaderText="Tên nhân viên hỗ trợ" />
                <asp:BoundField DataField="Nickname" HeaderText="Nick yahoo" />
                <asp:BoundField DataField="Order" HeaderText="Thứ tự" />
                <asp:CheckBoxField DataField="Active" HeaderText="Hiển thị" />
                <asp:TemplateField>
                    <ItemTemplate>
                        <asp:LinkButton ID="btn_CMD_Edit" runat="server" CommandArgument='<%# Eval("SupportOnlineID") %>'
                            CommandName="cmdEdit">Sửa</asp:LinkButton>
                        <asp:LinkButton ID="btn_CMD_Delete" runat="server" CommandArgument='<%# Eval("SupportOnlineID") %>'
                            CommandName="cmdDelete" OnClientClick="return confirm('Bạn có muốn xóa sản phẩm này không?');">Xóa</asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <HeaderStyle HorizontalAlign="Left" />
            <PagerSettings FirstPageText="Đầu" LastPageText="Cuối" Mode="NumericFirstLast" NextPageText="Tiếp"
                PreviousPageText="Trước" PageButtonCount="5" />
            <PagerStyle CssClass="pgr" />
        </asp:GridView>
    </asp:Panel>
    <asp:Panel ID="EditFormPanel" runat="server">
        <table id="editForm">
            <tbody>
                <tr>
                    <td class="label">
                        Tên nhân viên
                    </td>
                    <td>
                        <asp:TextBox ID="txtName" runat="server" Width="230px"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="requiredTenhang" runat="server" ControlToValidate="txtName"
                            ErrorMessage="Tên nhân viên không được để trống">*</asp:RequiredFieldValidator>
                    </td>
                    <td class="label">
                        Nick yahoo
                    </td>
                    <td>
                        <asp:TextBox ID="txtNickname" runat="server" Width="230px" TabIndex="4"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" ControlToValidate="txtNickname"
                            runat="server" ErrorMessage="Bạn chưa nhập nick yahoo">*</asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td class="label">
                        Thứ tự
                    </td>
                    <td>
                        <asp:TextBox ID="txtOrder" runat="server" TabIndex="2" Width="230px"></asp:TextBox>
                        <asp:CompareValidator ID="compareThutu" runat="server" ControlToValidate="txtOrder"
                            ErrorMessage="Thứ tự phải là số và nguyên dương" Operator="GreaterThanEqual"
                            Type="Integer" ValueToCompare="0">*</asp:CompareValidator>
                    </td>
                    <td class="label">
                        Hiển thị
                    </td>
                    <td>
                        <asp:CheckBox ID="chkActive" runat="server" TabIndex="7" />
                    </td>
                </tr>
                <tr>
                    <td colspan="4" class="center">
                        <asp:Button ID="btnSave" runat="server" Text="Cập nhật" CssClass="button button-green groupbutton"
                            OnClick="btnSave_Click" />
                        <asp:Button ID="btnCancel" runat="server" Text="Hủy bỏ" CssClass="button button-green groupbutton"
                            OnClick="btnCancel_Click" TabIndex="12" CausesValidation="False" UseSubmitBehavior="False" />
                    </td>
                </tr>
            </tbody>
        </table>
    </asp:Panel>
    <div class="clear">
    </div>
</asp:Content>
